﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="OwnerNew.aspx.cs" Inherits="NewOwner" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_head" runat="Server">
    <style>
        #step3 .form-horizontal .error,#step4 .form-horizontal .error {
            display:block;
        }
        #step3 .control-group,#step4 .control-group {
            display:none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_BreadCrumbs" runat="Server">
    <ul class="breadcrumb">
        <li><i class="icon-home home-icon"></i><a href="./default.aspx">首页</a> <span class="divider">
            <i class="icon-angle-right arrow-icon"></i></span></li>
        <li><a href="#">户主管理</a> <span class="divider">
            <i class="icon-angle-right arrow-icon"></i></span></li>
        <li><a href="#">添加户主</a> </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-header widget-header-blue widget-header-flat">
                    <h4 class="lighter">
                        新增户主信息</h4>
                </div>
                <div class="widget-body">
                    <div class="widget-main">
                        <div class="row-fluid">
                            <div id="fuelux-wizard" class="row-fluid hide" data-target="#step-container">
                                <ul class="wizard-steps">
                                    <li data-target="#step1" class="active"><span class="step">1</span> <span class="title">
                                        户主信息</span> </li>
                                    <li data-target="#step2"><span class="step">2</span> <span class="title">拆旧情况</span>
                                    </li>
                                    <li data-target="#step3"><span class="step">3</span> <span class="title">安置情况</span>
                                    </li>
                                    <li data-target="#step4"><span class="step">4</span> <span class="title">费用结算</span>
                                    </li>
                                </ul>
                            </div>
                            <hr />
                            <div class="step-content row-fluid position-relative" id="step-container">
                                <div class="step-pane active" id="step1">
                                    <div class="form-horizontal" id="validation-form" />
                                    <div class="control-group">
                                        <label class="control-label" for="txt_Name">
                                            户主姓名:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Name" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="sel_Village">
                                            所属行政村:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_Village" CssClass="span6" runat="server"></asp:DropDownList>
                                                
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="txt_IdCard">
                                            身份证号:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_IdCard" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="txt_AnzhiRenkou">
                                            安置人口:</label>
                                        <div class="controls">
                                            <span class="span12">
                                                <asp:TextBox ID="txt_Population" CssClass="span6" runat="server"></asp:TextBox>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="hr hr-dotted">
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="txt_ProcNo">
                                            协议编号:</label>
                                        <div class="controls">
                                            <span class="span12">
                                                <asp:TextBox ID="txt_ProcNo" CssClass="span6" runat="server"></asp:TextBox>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            协议类型:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_ProcType" CssClass="span6" runat="server"></asp:DropDownList>
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="step-pane" id="step2">
                                <div class="form-horizontal" id="Div1" >
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            拆旧时间:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_Time" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            结构:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_Chai_Structure" CssClass="span6" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            正房占地面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_MainCovers" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            正房建筑面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_MainArea" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            附房占地面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_Chai_AttachedCovers" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            附房建筑面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_Chai_AttachedArea" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            房前屋后:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_Fangqianwuhou" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            复垦地块编号:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Chai_ReclamationLotNo" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="step-pane" id="step3">
                                <div class="form-horizontal">
                                    <div class="control-group error">
                                        <label class="control-label" for="url">
                                            安置方式:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_An_Type" CssClass="span6" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            安置时间:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_Time" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            安置区块:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_An_Address" CssClass="span6" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            安置户型:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_Huxing" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            安置套数:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_Taoshu" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            房屋编号:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_HouseNo" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            占地面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_Covers" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            住房面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_Area" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            柴间编号:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_ChaiJianNo" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            柴间面积:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_An_ChaiJianArea" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            是否带阁楼:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_An_GeLou" CssClass="span6" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            建房方式:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:DropDownList ID="ddl_An_BuildType" CssClass="span6" runat="server"></asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="step-pane" id="step4">
                                <div class="form-horizontal">
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            房款数额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_Fangkuanshue" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            阁楼金额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_GeLouJinE" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            柴间金额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ChaiJianJinE" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            地基补差费:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_DiJiBuChaFei" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            施工水电费:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ShiGongShuiDianFei" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            水表开户费:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ShuiBiaoKaiHuFei" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            电表安装费:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_DianBiaoAnZhuangFei" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            装潢垃圾清运费:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_LaJiQingYunFei" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            施工保证金:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ShiGongBaoZhengJin" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            违约罚款:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_WeiYueFaKuan" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            代建水泥硬化:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_DaiJianShuiNiYingHua" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            拆架奖励:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ChaiJiaJiangLi" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            安置延期补偿:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_AnZhiYanQiBuChang" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            政策性补助:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_ZhengCeXingBuZhu" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            过渡期房租:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_GuoDuQiFangZu" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            应缴数额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_YingJiaoShuE" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            已缴数额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_YiJiaoShuE" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label" for="url">
                                            未交数额:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox ID="txt_Fei_WeiJiaoShuE" CssClass="span6" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <div class="control-group" style="display:block">
                                        <label class="control-label" for="url">
                                            备注:</label>
                                        <div class="controls">
                                            <div class="span12">
                                                <asp:TextBox TextMode="MultiLine" Rows="5" CssClass="span6" ID="txt_Remark" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr />
                        <div class="row-fluid wizard-actions">
                            <button class="btn btn-prev" type="button">
                                <i class="icon-arrow-left"></i>上一步
                            </button>
                            <button class="btn btn-success btn-next" type="button" data-last="完成 ">
                                下一步 <i class="icon-arrow-right icon-on-right"></i>
                            </button>
                            <asp:Button ID="btn_Save" runat="server" Text="Button" style="display:none" OnClick="btn_Save_Click" />
                        </div>
                    </div>
                </div>
                <!--/widget-main-->
            </div>
            <!--/widget-body-->
        </div>
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Foot" runat="Server">
    <script src="Base/Template/assets/js/fuelux/fuelux.wizard.min.js" type="text/javascript"></script>
    <script src="Base/Template/assets/js/jquery.validate.min.js" type="text/javascript"></script>
    <script src="Base/Template/assets/js/jquery.maskedinput.min.js" type="text/javascript"></script>
    <script src="Base/Template/assets/js/select2.min.js" type="text/javascript"></script>
    <script>

        $(function () {


            $('[data-rel=tooltip]').tooltip();




            var $validation = false;
            $('#fuelux-wizard').ace_wizard().on('change', function (e, info) {
                if (info.step == 1 && $validation) {
                    if (!$('#validation-form').valid()) return false;
                }
            }).on('finished', function (e) {
                //alert("OK");
                $("#<%=btn_Save.ClientID%>").click();
            }).on('stepclick', function (e) {
                //return false;//prevent clicking on steps
            });


            //documentation : http://docs.jquery.com/Plugins/Validation/validate


            $.mask.definitions['~'] = '[+-]';
            $('#phone').mask('(999) 999-9999');

            jQuery.validator.addMethod("phone", function (value, element) {
                return this.optional(element) || /^\(\d{3}\) \d{3}\-\d{4}( x\d{1,6})?$/.test(value);
            }, "Enter a valid phone number.");

            $('#validation-form').validate({
                errorElement: 'span',
                errorClass: 'help-inline',
                focusInvalid: false,
                rules: {
                    email: {
                        required: true,
                        email: true
                    },
                    password: {
                        required: true,
                        minlength: 5
                    },
                    password2: {
                        required: true,
                        minlength: 5,
                        equalTo: "#password"
                    },
                    name: {
                        required: true
                    },
                    phone: {
                        required: true,
                        phone: 'required'
                    },
                    url: {
                        required: true,
                        url: true
                    },
                    comment: {
                        required: true
                    },
                    state: {
                        required: true
                    },
                    platform: {
                        required: true
                    },
                    subscription: {
                        required: true
                    },
                    gender: 'required',
                    agree: 'required'
                },

                messages: {
                    email: {
                        required: "Please provide a valid email.",
                        email: "Please provide a valid email."
                    },
                    password: {
                        required: "Please specify a password.",
                        minlength: "Please specify a secure password."
                    },
                    subscription: "Please choose at least one option",
                    gender: "Please choose gender",
                    agree: "Please accept our policy"
                },

                invalidHandler: function (event, validator) { //display error alert on form submit   
                    $('.alert-error', $('.login-form')).show();
                },

                highlight: function (e) {
                    $(e).closest('.control-group').removeClass('info').addClass('error');
                },

                success: function (e) {
                    $(e).closest('.control-group').removeClass('error').addClass('info');
                    $(e).remove();
                },

                errorPlacement: function (error, element) {
                    if (element.is(':checkbox') || element.is(':radio')) {
                        var controls = element.closest('.controls');
                        if (controls.find(':checkbox,:radio').length > 1) controls.append(error);
                        else error.insertAfter(element.nextAll('.lbl:eq(0)').eq(0));
                    }
                    else if (element.is('.select2')) {
                        error.insertAfter(element.siblings('[class*="select2-container"]:eq(0)'));
                    }
                    else if (element.is('.chzn-select')) {
                        error.insertAfter(element.siblings('[class*="chzn-container"]:eq(0)'));
                    }
                    else error.insertAfter(element);
                },

                submitHandler: function (form) {
                },
                invalidHandler: function (form) {
                }
            });





        })
        $(document).ready(function () {
            $("#<%=ddl_An_BuildType.ClientID%>").change(function () {
                var anBuildType = $("#<%=ddl_An_BuildType.ClientID%>").val();
                var anType = $("#<%=ddl_An_Type.ClientID%>").val();
                if (anType == "中心村联建") {
                    if (anBuildType == "代建") {
                        $(".controls").parent().removeClass("error");
                        $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_HouseNo.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Covers.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Area.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_BuildType.ClientID%>").parent().parent().parent().addClass("error");

                        $("#<%=txt_Fei_Fangkuanshue.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ShuiBiaoKaiHuFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_DianBiaoAnZhuangFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YingJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_WeiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                    }
                    else if (anBuildType == "自建") {
                        $(".controls").parent().removeClass("error");
                        $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_HouseNo.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Covers.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Area.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_BuildType.ClientID%>").parent().parent().parent().addClass("error");

                        $("#<%=txt_Fei_DiJiBuChaFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ShiGongShuiDianFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ShuiBiaoKaiHuFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_DianBiaoAnZhuangFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ShiGongBaoZhengJin.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_WeiYueFaKuan.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_DaiJianShuiNiYingHua.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ChaiJiaJiangLi.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_AnZhiYanQiBuChang.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_GuoDuQiFangZu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YingJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_WeiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                    }
                    else {
                        $(".controls").parent().removeClass("error");
                        $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    }
                }
            });
            $("#<%=ddl_An_Address.ClientID%>").change(function () {
                
                var anType = $("#<%=ddl_An_Type.ClientID%>").val();
                var anAddress = $("#<%=ddl_An_Address.ClientID%>").val();
                if (anType == "农民公寓") {
                    //$(".controls").parent().removeClass("error");
                    if (anAddress == "兰苑" || anAddress == "河苑" || anAddress == "将苑") {
                        $(".controls").parent().removeClass("error");
                        $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");

                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Huxing.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Taoshu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_HouseNo.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Area.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_ChaiJianNo.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_ChaiJianArea.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_GeLou.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_Fangkuanshue.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_GeLouJinE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ChaiJianJinE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ShuiBiaoKaiHuFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_DianBiaoAnZhuangFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_LaJiQingYunFei.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_GuoDuQiFangZu.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YingJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_YiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_WeiJiaoShuE.ClientID%>").parent().parent().parent().addClass("error");
                    }
                    else {
                        $(".controls").parent().removeClass("error");
                        $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");

                        $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                        $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                    }
                }
            })
            $("#<%=ddl_An_Type.ClientID%>").change(function () {
                $(".controls").parent().removeClass("error");
                $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                var anType = $("#<%=ddl_An_Type.ClientID%>").val();
                if (anType == "农民公寓") {
                    $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");

                }
                if (anType == "无房户") {
                    $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                }
                if (anType == "中心村联建") {
                    $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_HouseNo.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Covers.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Area.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=ddl_An_BuildType.ClientID%>").parent().parent().parent().addClass("error");

                }
                if (anType == "行政村联建") {
                    $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=ddl_An_Address.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                }
                if (anType == "货币") {
                    $("#<%=ddl_An_Type.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_An_Time.ClientID%>").parent().parent().parent().addClass("error");
                    $("#<%=txt_Fei_ZhengCeXingBuZhu.ClientID%>").parent().parent().parent().addClass("error");
                }

            });
            
        });
    </script>
</asp:Content>
